package com.unimod.fsml.util;

import static com.unimod.fsml.model.lexer.LexerParameters.TOKEN_VALUE;

import com.evelopers.unimod.runtime.context.StateMachineContext;

/**
 * This class provide common functionality for some <code>ControlledObject</code> implementations.
 * 
 * @author Ivan Lagunov
 */
public class COHelper {
	
	/**
	 * Loads token value parameter from given {@link StateMachineContext context}.
	 * 
	 * @param context state machine context to load parameter from.
	 * @return string value of parameter.
	 */
	public static String getTokenValue(StateMachineContext context) {
		return (String) context.getEventContext().getParameter(TOKEN_VALUE);
	}
}
